<template>
  <div class="parent">
      <h1>父级</h1>
      <!-- 传送组件1 -->
      <teleport :disabled="bol" to='body' > 
          <popUp @on-click="onBtn"></popUp>
      </teleport>
  </div>
</template>
<script setup lang='ts'>
  import popUp from '/src/components/popup/index.vue'
  import { ref } from 'vue';
  const bol = ref(false)
const onBtn = (str:string)=>{
  bol.value = !bol.value
}
</script>
<style scoped lang='less'>
* {
      margin: 0;
      padding: 0;
    }
.parent {
      background: #1acbec;
      height: 50vh;
      position: relative;
      h1{
        color: #fff;
      }
    }
</style>